/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa036is.controllers;

import cz.muni.fi.pa036is.servicesinterface.SeasonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author jostri
 */
@Controller
public class PublicController {
	
	@Autowired
	private SeasonService seasonService;
	
	@RequestMapping("/public/season")
	public String seasons(ModelMap modelMap) {
		
		modelMap.addAttribute("seasons", this.seasonService.getAllSeasons());
		
		return "/public/season";
	}
	
}
